package org.cxmzzhl.xyj1510;

public class Person {
    private String name;
    private String role;
    private String subject;
    //构造方法1
    public Person(String name,String role){
        this.name = name;
        this.role = role;
    }
    //构造方法2
    public Person(String name,String role,String subject){
        this.name = name;
        this.role = role;
        this.subject = subject;
    }
    public void print(){
        System.out.println("姓名："+name);
        System.out.println("身份："+role);
        System.out.println("教学科目："+subject);
    }
}
